/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author vanessa
 */
@Entity
@Table(name = "tb_Reapertura")
@NamedQueries({
    @NamedQuery(name = "TbReapertura.findAll", query = "SELECT t FROM TbReapertura t"),
    @NamedQuery(name = "TbReapertura.findByIdReapertura", query = "SELECT t FROM TbReapertura t WHERE t.tbReaperturaPK.idReapertura = :idReapertura"),
    @NamedQuery(name = "TbReapertura.findByInscrinro", query = "SELECT t FROM TbReapertura t WHERE t.inscrinro = :inscrinro"),
    @NamedQuery(name = "TbReapertura.findByFecha", query = "SELECT t FROM TbReapertura t WHERE t.tbReaperturaPK.fecha = :fecha"),
    @NamedQuery(name = "TbReapertura.findBySercod", query = "SELECT t FROM TbReapertura t WHERE t.sercod = :sercod"),
    @NamedQuery(name = "TbReapertura.findBySerdesc", query = "SELECT t FROM TbReapertura t WHERE t.serdesc = :serdesc"),
    @NamedQuery(name = "TbReapertura.findByFscsernro", query = "SELECT t FROM TbReapertura t WHERE t.fscsernro = :fscsernro"),
    @NamedQuery(name = "TbReapertura.findByFscnro", query = "SELECT t FROM TbReapertura t WHERE t.fscnro = :fscnro"),
    @NamedQuery(name = "TbReapertura.findBySolnro", query = "SELECT t FROM TbReapertura t WHERE t.solnro = :solnro"),
    @NamedQuery(name = "TbReapertura.findByGrupo", query = "SELECT t FROM TbReapertura t WHERE t.grupo = :grupo"),
    @NamedQuery(name = "TbReapertura.findByFscprecio", query = "SELECT t FROM TbReapertura t WHERE t.fscprecio = :fscprecio"),
    @NamedQuery(name = "TbReapertura.findByFlagRegistrada", query = "SELECT t FROM TbReapertura t WHERE t.flagRegistrada = :flagRegistrada"),
    @NamedQuery(name = "TbReapertura.findByMotivo", query = "SELECT t FROM TbReapertura t WHERE t.motivo = :motivo"),
    @NamedQuery(name = "TbReapertura.findByCodTipoAccion", query = "SELECT t FROM TbReapertura t WHERE t.codTipoAccion = :codTipoAccion"),
    @NamedQuery(name = "TbReapertura.findByLogUser", query = "SELECT t FROM TbReapertura t WHERE t.logUser = :logUser")})
public class TbReapertura implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TbReaperturaPK tbReaperturaPK;
    @Basic(optional = false)
    @Column(name = "inscrinro")
    private BigInteger inscrinro;
    @Basic(optional = false)
    @Column(name = "sercod")
    private long sercod;
    @Column(name = "serdesc")
    private String serdesc;
    @Column(name = "fscsernro")
    private Long fscsernro;
    @Column(name = "fscnro")
    private Long fscnro;
    @Column(name = "solnro")
    private Long solnro;
    @Column(name = "grupo")
    private Long grupo;
    @Column(name = "fscprecio")
    private Long fscprecio;
    @Column(name = "flag_registrada")
    private Boolean flagRegistrada;
    @Column(name = "motivo")
    private String motivo;
    @Column(name = "cod_tipo_accion")
    private String codTipoAccion;
    @Column(name = "log_user")
    private String logUser;

    public TbReapertura() {
    }

    public TbReapertura(TbReaperturaPK tbReaperturaPK) {
        this.tbReaperturaPK = tbReaperturaPK;
    }

    public TbReapertura(TbReaperturaPK tbReaperturaPK, BigInteger inscrinro, long sercod) {
        this.tbReaperturaPK = tbReaperturaPK;
        this.inscrinro = inscrinro;
        this.sercod = sercod;
    }

    public TbReapertura(int idReapertura, Date fecha) {
        this.tbReaperturaPK = new TbReaperturaPK(idReapertura, fecha);
    }

    public TbReaperturaPK getTbReaperturaPK() {
        return tbReaperturaPK;
    }

    public void setTbReaperturaPK(TbReaperturaPK tbReaperturaPK) {
        this.tbReaperturaPK = tbReaperturaPK;
    }

    public BigInteger getInscrinro() {
        return inscrinro;
    }

    public void setInscrinro(BigInteger inscrinro) {
        this.inscrinro = inscrinro;
    }

    public long getSercod() {
        return sercod;
    }

    public void setSercod(long sercod) {
        this.sercod = sercod;
    }

    public String getSerdesc() {
        return serdesc;
    }

    public void setSerdesc(String serdesc) {
        this.serdesc = serdesc;
    }

    public Long getFscsernro() {
        return fscsernro;
    }

    public void setFscsernro(Long fscsernro) {
        this.fscsernro = fscsernro;
    }

    public Long getFscnro() {
        return fscnro;
    }

    public void setFscnro(Long fscnro) {
        this.fscnro = fscnro;
    }

    public Long getSolnro() {
        return solnro;
    }

    public void setSolnro(Long solnro) {
        this.solnro = solnro;
    }

    public Long getGrupo() {
        return grupo;
    }

    public void setGrupo(Long grupo) {
        this.grupo = grupo;
    }

    public Long getFscprecio() {
        return fscprecio;
    }

    public void setFscprecio(Long fscprecio) {
        this.fscprecio = fscprecio;
    }

    public Boolean getFlagRegistrada() {
        return flagRegistrada;
    }

    public void setFlagRegistrada(Boolean flagRegistrada) {
        this.flagRegistrada = flagRegistrada;
    }

    public String getMotivo() {
        return motivo;
    }

    public void setMotivo(String motivo) {
        this.motivo = motivo;
    }

    public String getCodTipoAccion() {
        return codTipoAccion;
    }

    public void setCodTipoAccion(String codTipoAccion) {
        this.codTipoAccion = codTipoAccion;
    }

    public String getLogUser() {
        return logUser;
    }

    public void setLogUser(String logUser) {
        this.logUser = logUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tbReaperturaPK != null ? tbReaperturaPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbReapertura)) {
            return false;
        }
        TbReapertura other = (TbReapertura) object;
        if ((this.tbReaperturaPK == null && other.tbReaperturaPK != null) || (this.tbReaperturaPK != null && !this.tbReaperturaPK.equals(other.tbReaperturaPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbReapertura[tbReaperturaPK=" + tbReaperturaPK + "]";
    }

}
